﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZeroBugBounce.Missive
{
	internal static class PrivateExtensionMethods
	{
		public static IEnumerable<Type> ListAllBaseTypes(this Type type)
		{
			if (type.BaseType != null)
			{
				foreach (Type baseType in ListAllBaseTypes(type.BaseType))
				{
					yield return baseType;
				}

				yield return type.BaseType;
			}
		}
	}
}
